package com.itheima.IO;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo3 {
    public static void main(String[] args) throws IOException {
        //读取,存入流
        FileInputStream fis = new FileInputStream("D:\\java.txt");
        FileOutputStream fos = new FileOutputStream("day12_file&IOstream\\java.txt");
        //定义变量临时存储
        int b ;
        //循环读写
         while ((b = fis.read()) != -1){
             fos.write(b);
         }
         //资源释放
         fis.close();
         fos.close();
    }
}
